package com.ady.dogeyes.service.impl;

import com.ady.dogeyes.entity.Movie;
import com.ady.dogeyes.mapper.MovieMapper;
import com.ady.dogeyes.service.MovieService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author luohz
 * @since 2021-07-01
 */
@Service
public class MovieServiceImpl extends ServiceImpl<MovieMapper, Movie> implements MovieService {

    @Autowired
    private MovieMapper movieMapper;

    @Override
    public IPage<Movie> movieList(int pageNum,int pageSize) {
        return movieMapper.selectPage(new Page<Movie>(pageNum,pageSize),null);
    }
}
